home *** CD-ROM | disk | FTP | other *** search
/ Greatest Childrens Stories Ever Told / Greatest_Stories.iso / demos / funtown / demo.dir / 00051_Script_Scripts 8 < prev    next >
Text File  |  1994-11-08  |  4KB  |  100 lines

  1. --òòò Scripts 6
  2. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  3. on showPatch newLocH, newLocV
  4.   global MS
  5.   if MS="Find" then showPatchOther newLocH, newLocV, 43, 1
  6.   else if MS="Match" then showPatchOther newLocH, newLocV, 43, 1
  7.   else showPatchOther newLocH, newLocV, 44, 0
  8. end
  9. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  10. on showPatchOther newLocH, newLocV, whichSprite, BO
  11.   global QL, WQ, availableQuestions, mode, MS, CV, ML, QC
  12.   if MS="Find" or MS="Match" then
  13.     activate 47 ,"TransparentQDBox; center",1,37,10,269,"stretch to:",370,363
  14.     updateStage
  15.   end if
  16.   set whichLine=value ( item ( WQ ) of QL )
  17.   set activateParameters="activate 2,"& line ( whichLine ) of QC
  18.   updatePatch 2, activateParameters, the left of sprite 1, the top of sprite 1
  19.   set whichCast=item 10 of activateParameters
  20.   set whichCast=char 2 to ( the number of chars in whichCast -1 ) of whichCast
  21.   if whichCast="" or the number of cast ( whichCast )=-1 then
  22.     put "Hey! "& ( whichCast ) &" is not a cast member."
  23.     exit
  24.   end if
  25.   activate whichSprite,whichCast,1,36,190,310,"","",""
  26.   set the backColor of sprite whichSprite=255
  27.   if MS="Find" and BO=1 then showPatchFind activateParameters
  28.   if MS="Match" and BO=1 then showPatchMatch activateParameters
  29.   updateStage
  30. end
  31. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  32. on showPatchFind activateParameters
  33.   set rightSide=value ( item ( the number of items in activateParameters ) of activateParameters )
  34.   activate 44 ,"TransparentQDBox; center",1,0,21,275,"stretch to:",21+rightSide,346
  35.   updateStage
  36. end
  37. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  38. on showPatchMatch activateParameters
  39.   set leftSide=value ( item ( the number of items in activateParameters ) of activateParameters )
  40.   activate 44 ,"TransparentQDBox; center",1,0,21+leftSide,275,"stretch to:",360,346
  41.   updateStage
  42. end
  43. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  44. on updatePatch whichSprite, activateParameters, newLocH, newLocV
  45.   global QL, WQ, mode, MS, CV, ML, RD
  46.   if whichSprite<2 or whichSprite>=35 then exit
  47.   set whichCast=item 2 of activateParameters
  48.   if whichCast contains "òNo Patch" then
  49.     activate whichSprite ,"TransparentQDBox",1,0,-5000,-5000,"","",""
  50.     exit
  51.   end if
  52.   if ( RD ) then
  53.     if the type of sprite whichSprite=0 then exit 
  54.     if the locV of sprite whichSprite<=-4999 then exit
  55.   end if
  56.   put ( value ( item 5 of activateParameters ) + newLocH ) into item 5 of activateParameters
  57.   put ( value ( item 6 of activateParameters ) + newLocV ) into item 6 of activateParameters
  58.   if ( item 8 of activateParameters<>quote"e ) then put ( value ( item 8 of activateParameters ) + newLocH ) into item 8 of activateParameters
  59.   if ( item 9 of activateParameters<>quote"e ) then put ( value ( item 9 of activateParameters ) + newLocV ) into item 9 of activateParameters
  60.   if the type of sprite whichSprite=0 then do ( activateParameters )
  61.   else if 1=1 or the name of cast ( the castNum of sprite whichSprite )<>whichCast then do ( activateParameters )
  62.   if item 2 of activateParameters contains "TransparentQDBox" then set the backColor of sprite whichSprite=255
  63.   if ( item 7 of activateParameters=quote"e ) then
  64.     set the locH of sprite whichSprite=value ( item 5 of activateParameters )
  65.     set the locV of sprite whichSprite=value ( item 6 of activateParameters )
  66.   else
  67.     set spriteLeft=value ( item 5 of activateParameters )
  68.     set spriteTop=value ( item 6 of activateParameters )
  69.     set spriteRight=value ( item 8 of activateParameters )
  70.     set spriteBottom=value ( item 9 of activateParameters )
  71.     spritebox whichSprite, spriteLeft, spriteTop, spriteRight, spriteBottom
  72.   end if
  73. end
  74. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  75. on revealPatches
  76.   global mode, MS
  77.   if mode>2 and mode<10 then
  78.     if the timer<30 then exit
  79.     revealOnePatch
  80.   end if
  81. end
  82. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  83. on revealOnePatch
  84.   global MS, IL, FCL, NQ
  85.   set whichSprite=2
  86.   put the ink of sprite whichSprite into IL
  87.   put the foreColor of sprite whichSprite into FCL
  88.   set the ink of sprite whichSprite=4
  89.   set the forecolor of sprite whichSprite=255
  90.   updateStage
  91.   startTimer
  92.   repeat while the timer<5 or the mouseDown
  93.     do ( "nothing" )
  94.   end repeat
  95.   set the ink of sprite whichSprite=value ( IL )
  96.   set the forecolor of sprite whichSprite=value ( FCL )
  97.   updateStage
  98. end
  99.  
  100.